package com.linchaoen.elema.mapper;

import com.linchaoen.elema.model.entity.Cart;
import com.linchaoen.elema.model.request.CartRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {

    List<Cart> findCartListByUserId(@Param("user_id") Integer user_id);

    int addCart(@Param("user_id") Integer userId, @Param("food_id") Integer foodId, @Param("num") Integer num);

    int addCartBatch(@Param("user_id") Integer userId, List<Cart> list);

    int removeCart(@Param("user_id") Integer uid, @Param("id") Integer id);

    int changeNum(@Param("user_id") Integer uid, @Param("id") Integer id, @Param("num") Integer num);

}
